﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AddNguoiDung.ascx.cs"
    Inherits="Viewer.NguoiDung.UserControls.AddNew" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<ext:Hidden ID="__DialogType" runat="server">
</ext:Hidden>
<link href="../../resources/css/main.css" rel="stylesheet" type="text/css" />
<ext:Window ID="wdAddNewHuman" runat="server" Width="430" AutoHeight="true" Modal="true"
    Closable="false" Hidden="true" HideBorders="True" Border="false" Plain="true"
    Resizable="false" Frame="false" Title="Tạo mới người dùng" Icon="User">
    <Items>
        <ext:Panel ID="Panel1" runat="server" Frame="true" Height="100" BodyStyle="background-color: white; ">
            <Content>
                <table>
                    <tr style="display: none;">
                        <td>
                            Người dùng ID
                        </td>
                        <td>
                            <ext:TextField ID="txtId" runat="server" Disabled="true" Width="300" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Tên đăng nhập
                        </td>
                        <td>
                            <ext:TextField ID="txtFullName" runat="server" Width="300" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Mật khẩu
                        </td>
                        <td>
                            <ext:TextField ID="txtPass" runat="server" Width="300" />
                        </td>
                    </tr>
                </table>
            </Content>
            <Buttons>
                <ext:Button ID="btnSave" runat="server" Text="Lưu" Icon="Disk">
                    <Listeners>
                        <Click Handler="
                                    //Validate
                                    if(#{txtFullName}.getValue()=='')
                                    {
                                        Ext.MessageBox.alert('Message', 'Bạn chưa nhập tên !');
                                        #{txtFullName}.focus();
                                        return false;
                                    }
                                " />
                    </Listeners>
                    <DirectEvents>
                        <Click OnEvent="btnSave_Click">
                        </Click>
                    </DirectEvents>
                </ext:Button>
                <ext:Button ID="Button1" runat="server" Text="Đóng" Icon="Cancel">
                    <Listeners>
                        <Click Handler="#{wdAddNewHuman}.hide();" />
                    </Listeners>
                </ext:Button>
            </Buttons>
        </ext:Panel>
    </Items>
</ext:Window>
